<?php
require_once 'models/cms.inc';
require_once 'models/catalog.inc';


/**
 * @author dkrasilnikov@gmail.com
 * 
 * @orm.table sticker(code)
 * @orm.key Code
 * @orm.identity explicit
 */
class TMSSticker extends TNOrmObject {
/**
 * @var string
 * @orm.scalar code
 */	
	public $Code;
	
/**
 * @var string
 * @orm.scalar title
 */	
	public $Title;
	
/**
 * @var string
 * @orm.scalar description
 */	
	public $Descrition;
	
	public function __toString(){
		return $this->Title;
	}
}

/**
 * @author dkrasilnikov@gmail.com
 * @orm.table product_page(pid)
 * 
 * @property TMSSticker $Sticker {@orm.reference Code(product_page.sticker)}
 */
class TMSProductPage extends TMSPage {
/**
 * @var TMSSticker
 */	
	protected $_orm_sticker_;
}

/**
 * @author dkrasilnikov@gmail.com
 * @orm.table article_page(pid)
 * 
 * @property TMSArticle $Product {@orm.reference Id(article_page.article)}
 */
class TMSArticlePage extends TMSProductPage {
/**
 * @var TMSArticle
 */
	protected $_orm_product_;
}

/**
 * @author dkrasilnikov@gmail.com
 * @orm.table nomenclature_page(pid)
 * 
 * @property TMSNomenclature $Product {@orm.reference Id(nomenclature_page.nomenclature)}
 */
class TMSNomenclaturePage extends TMSProductPage {
	/**
	 * @var TMSNomenclature
	 */
	protected $_orm_product_;
}
